Skip to main content

Account is Setup

Check to see if an account looks like it has been set up to hold AllDay NFTs.

Returns: bool - A bool indicating if the account has been setup.

import NonFungibleToken from 0xNONFUNGIBLETOKENADDRESS
import AllDay from 0xALLDAYADDRESS

pub fun main(address: Address): Bool {
let account = getAccount(address)
return account.getCapability<&{
NonFungibleToken.CollectionPublic,
AllDay.MomentNFTCollectionPublic
}>(AllDay.CollectionPublicPath)
!= nil
}